-- GENERATED SPELL FOR [Mogor] --


function spell0_18069(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(16033,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18069', 3000, 1)
end

function spell1_18069(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(39529,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18069', 12000, 1)
end

function spell2_18069(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(28747,pUnit)
pUnit:RegisterEvent('Sorts_18069', 549, 1)
end

function spell3_18069(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(15982,pUnit)
pUnit:RegisterEvent('Sorts_18069', 3000, 1)
end

function spell4_18069(pUnit, Event) --@Revive Self,n/a--
pUnit:FullCastSpellOnTarget(32343,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18069', 617, 1)
end

function spell5_18069(pUnit, Event) --@Summon Ice Totem,n/a--
pUnit:FullCastSpellOnTarget(18975,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18069', 599, 1)
end

function Sorts_18069(pUnit, Event)
local choix_sorts_18069 = math.random(0, 5)
if choix_sorts_18069 == 0 then
pUnit:RegisterEvent('spell0_18069', 1, 1)
end
if choix_sorts_18069 == 1 then
pUnit:RegisterEvent('spell1_18069', 1, 1)
end
if choix_sorts_18069 == 2 then
pUnit:RegisterEvent('spell2_18069', 1, 1)
end
if choix_sorts_18069 == 3 then
pUnit:RegisterEvent('spell3_18069', 1, 1)
end
if choix_sorts_18069 == 4 then
pUnit:RegisterEvent('spell4_18069', 1, 1)
end
if choix_sorts_18069 == 5 then
pUnit:RegisterEvent('spell5_18069', 1, 1)
end
end

function mob18069_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18069', math.random(1500, 3000), 1)
end

function mob18069_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18069_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18069_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18069, 1, 'mob18069_Action')
RegisterUnitEvent(18069, 2, 'mob18069_Leave')
RegisterUnitEvent(18069, 3, 'mob18069_Kill')
RegisterUnitEvent(18069, 4, 'mob18069_Die')
